﻿namespace EyeOpen.Validation.Test
{
    using EyeOpen.Validation.Mapping;

    public class ProjectValidator : EntityValidator<Project>
    {
        protected override void ValidateEntity(Project entity)
        {
            if (entity.Priority < 0)
            {
                var validationResult = new ValidationResult();
                validationResult.ValidationMessages.Add("Priority must be greater than 0");
                AddValidationResult(validationResult);
            }
        }
    }
}
